#-*- coding: utf-8 -*-

'''停止词'''
from nltk.corpus import stopwords
def getstopwords():
  return stopwords.words('english')
stopwordList = [';','–',':','.',',','?','!','"',"'",'','-','(',')','--','‘','’','“','”','a.m','p.m','%','&']+getstopwords()
stopwordDict = {}
for w in stopwordList:
  stopwordDict[w] = 1
#print(stopwordDict)
text = '''#-*- coding: utf-8 -*-
stopwordDict = ''' + str(stopwordDict)

try:
  _f = open('myconstantnlp.py','wb')
  _f.write(text.encode('utf-8'))
except Exception as ex:
  print(str(ex))
finally:
  _f.close()
